/*---------------------------------------------------------------------------------------------
 *  Copyright (c) kylinIDETeam. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

import { ISandboxConfiguration } from 'vs/base/parts/sandbox/common/sandboxTypes';
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';

// Since data sent through the service is serialized to JSON, functions will be lost, so Color objects
// should not be sent as their 'toString' method will be stripped. Instead convert to strings before sending.
export interface WindowStyles {
	backgroundColor?: string;
	color?: string;
}
export interface WindowData {
	styles: WindowStyles;
	zoomLevel: number;
}

export const enum DeployType {
	OnlineDeploy,
	OnlineDownLoad,
	OfflineDeploy,
	SkipAll
}

export interface ISettingSearchResult {
	extensionId: string;
	key: string;
	score: number;
}

export interface DeployStyles extends WindowStyles {
	listHoverBackground?: string;
	listHoverForeground?: string;
	listFocusBackground?: string;
	listFocusForeground?: string;
	listFocusOutline?: string;
	listActiveSelectionBackground?: string;
	listActiveSelectionForeground?: string;
	listHoverOutline?: string;
	scrollbarShadowColor?: string;
	scrollbarSliderBackgroundColor?: string;
	scrollbarSliderHoverBackgroundColor?: string;
	scrollbarSliderActiveBackgroundColor?: string;
}
export interface DeployData extends WindowData {
	pid: number;
	styles: DeployStyles;
	platform: string;
	applicationName: string;
}

export interface DeployWindowConfiguration extends ISandboxConfiguration {
	data: DeployData;
}

export const IDeployMainService = createDecorator<IDeployMainService>('deployService');

export interface IDeployMainService {
	readonly _serviceBrand: undefined;
	openDeployWindow(flag?: boolean): Promise<any>;
}
